<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>{$head[title]}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta content="{$head[keywords]}" name="keywords" />
<meta content="{$head[description]}" name="description" />
<base href="{SITE_URL}" />
<link href="favicon.ico" rel="shortcut icon" />
<link href="skin/style.css" rel="stylesheet" type="text/css" />
<link rel="alternate" type="application/rss+xml" title="{$head[title]}" href="/rss.php?rssid={$catid}" />
<script language="JavaScript" src="misc/config.js"></script>
<script language="JavaScript" src="misc/jquery.min.js"></script>
<script language="JavaScript" src="misc/common.js"></script>
<script language="JavaScript" src="misc/validator.js"></script>
</head>
<body>

{template 'header.html'}

<div class="container">
    <div class="aside">
        {template "left.html",'yellowpage'}
    </div>
    
    <div class="main">
    	<script language="javascript">
		<!--
		function update(x,y,z)
		{
			$.ajax({
			type: "POST",
			url: '{BUSINESSDIR}/',
			data: "file=map&action=update&x="+x+"&y="+y+"&z="+z,
			success: function(msg)
			{
				if(msg==1)
				{
					alert('企业地址位置保存成功');
					window.location.reload();
				}
				else
				{
					alert('操作失败');
				}
			}	
			});
		}
		//-->
		</script>
		<script language="javascript" src="http://api.51ditu.com/js/maps.js"></script>
		<script language="javascript" src="http://api.51ditu.com/js/ezmarker.js"></script>
		<table width="100%"  border="0" cellpadding="5" cellspacing="2" class="table_list">
		<th >企业地理位置标注</th>
		<input type="hidden" id="x" name="x">
		<input type="hidden" id="y" name="y">
		<input type="hidden" id="z" name="z">
		<tr> 
			<td class="tablerow">
		<script language="JavaScript">
		<!--
			function setMap(point,zoom)
			{
				var x = point.getLongitude();
				var y = point.getLatitude();
				var z = zoom;
				update(x,y,z);
			}
		
			var ezmarker = new LTEZMarker("pos");
			LTEvent.addListener(ezmarker,"mark",setMap);//"mark"是标注事件
			
		//-->
		</script>
			</td>
		</tr>
		</table><BR>
		{if $map!=''}
		<table width="100%"  border="0" cellpadding="5" cellspacing="2" class="tableborder">
		<TR>
			<TD>
		<div id="maps" style="position:relative; width:100%; height:350px; border:black solid 1px;"> 
		   <script language="javascript">
			var maps = new LTMaps( "maps" );
			var c = new LTSmallMapControl();
			maps.addControl(c);
			var point = new LTPoint({$x},{$y}); 
			maps.centerAndZoom( point, {$z} );
			var text=new LTMapText(point,[0,-18]);
			text.setLabel( "{$company_user_infos[companyname]}" );
			setTimeout("maps.addOverLay( text );",3000);
			var icon=new LTIcon("{$M[url]}images/centerPoi.gif",[24,24],[12,12]);
			var marker=new LTMarker(new LTPoint({$x},{$y}),icon);
			maps.addOverLay(marker);
		</script>
		</div></TD>
		</TR>
		</TABLE>
		{/if}
    </div>
    
</div>

 
{template 'footer.html'}